package com.wsq.retrofitdemo.model.request;

import com.wsq.retrofitdemo.utils.Constants;
import com.wsq.retrofitdemo.utils.GenerateSign;

import java.util.HashMap;
import java.util.Map;

/**
 * 查询音频检查结果
 *
 * Date:2021/9/2
 * Time:16:13
 * author:wushengqi
 * audio _id String 1-32 是 音频 ID
 * task_id String 1-32 是 任务 ID
 */
public class IFlyCheckAudioReq extends IFlyBase{
    public String audio_id;
    public String task_id;

    @Override
    public String sign() {
        Map<String, String> map = new HashMap<>();
        map.put("audio_id",audio_id);
        map.put("task_id",task_id);
        map.put("clientType",clientType+"");
        try {
            return sign = GenerateSign.generateSign(openid, Constants.OPEN_KEY, "", map);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return "";
    }

    @Override
    public Map<String, String> getMap() {
        Map<String, String> map = new HashMap<>();
        map.put("audio_id",audio_id);
        map.put("task_id",task_id);
        map.put("clientType",clientType+"");
        map.put("sign",sign);
        map.put("openid",openid);
        return map;
    }
}
